-- GENERATED SPELL FOR [Yazzai] --


function spell0_24561(pUnit, Event) --@Blink,Self--
pUnit:FullCastSpellOnTarget(14514,pUnit)
pUnit:RegisterEvent('Sorts_24561', 1278, 1)
end

function spell1_24561(pUnit, Event) --@Blizzard,n/a--
pUnit:FullCastSpellOnTarget(44178,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_24561', 8000, 1)
end

function spell2_24561(pUnit, Event) --@Blizzard,n/a--
pUnit:FullCastSpellOnTarget(46195,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_24561', 8000, 1)
end

function spell3_24561(pUnit, Event) --@Cone of Cold,Self--
pUnit:FullCastSpellOnTarget(12611,pUnit)
pUnit:RegisterEvent('Sorts_24561', 8319, 1)
end

function spell4_24561(pUnit, Event) --@Cone of Cold,Self--
pUnit:FullCastSpellOnTarget(38384,pUnit)
pUnit:RegisterEvent('Sorts_24561', 8261, 1)
end

function spell5_24561(pUnit, Event) --@Drink Healing Potion,Self--
pUnit:FullCastSpellOnTarget(15503,pUnit)
pUnit:RegisterEvent('Sorts_24561', 571, 1)
end

function spell6_24561(pUnit, Event) --@Frost Nova,Self--
pUnit:FullCastSpellOnTarget(44177,pUnit)
pUnit:RegisterEvent('Sorts_24561', 8301, 1)
end

function spell7_24561(pUnit, Event) --@Frostbolt,n/a--
pUnit:FullCastSpellOnTarget(15043,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_24561', 7000, 1)
end

function spell8_24561(pUnit, Event) --@Frostbolt,n/a--
pUnit:FullCastSpellOnTarget(15530,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_24561', 7000, 1)
end

function spell9_24561(pUnit, Event) --@Ice Block,Self--
pUnit:FullCastSpellOnTarget(27619,pUnit)
pUnit:RegisterEvent('Sorts_24561', 10283, 1)
end

function spell10_24561(pUnit, Event) --@Ice Lance,n/a--
pUnit:FullCastSpellOnTarget(44176,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_24561', 671, 1)
end

function spell11_24561(pUnit, Event) --@Ice Lance,n/a--
pUnit:FullCastSpellOnTarget(46194,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_24561', 588, 1)
end

function spell12_24561(pUnit, Event) --@Medallion of Immunity,Self--
pUnit:FullCastSpellOnTarget(46227,pUnit)
pUnit:RegisterEvent('Sorts_24561', 310, 1)
end

function spell13_24561(pUnit, Event) --@Polymorph,n/a--
pUnit:FullCastSpellOnTarget(13323,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_24561', 9500, 1)
end

function Sorts_24561(pUnit, Event)
local choix_sorts_24561 = math.random(0, 13)
if choix_sorts_24561 == 0 then
pUnit:RegisterEvent('spell0_24561', 1, 1)
end
if choix_sorts_24561 == 1 then
pUnit:RegisterEvent('spell1_24561', 1, 1)
end
if choix_sorts_24561 == 2 then
pUnit:RegisterEvent('spell2_24561', 1, 1)
end
if choix_sorts_24561 == 3 then
pUnit:RegisterEvent('spell3_24561', 1, 1)
end
if choix_sorts_24561 == 4 then
pUnit:RegisterEvent('spell4_24561', 1, 1)
end
if choix_sorts_24561 == 5 then
pUnit:RegisterEvent('spell5_24561', 1, 1)
end
if choix_sorts_24561 == 6 then
pUnit:RegisterEvent('spell6_24561', 1, 1)
end
if choix_sorts_24561 == 7 then
pUnit:RegisterEvent('spell7_24561', 1, 1)
end
if choix_sorts_24561 == 8 then
pUnit:RegisterEvent('spell8_24561', 1, 1)
end
if choix_sorts_24561 == 9 then
pUnit:RegisterEvent('spell9_24561', 1, 1)
end
if choix_sorts_24561 == 10 then
pUnit:RegisterEvent('spell10_24561', 1, 1)
end
if choix_sorts_24561 == 11 then
pUnit:RegisterEvent('spell11_24561', 1, 1)
end
if choix_sorts_24561 == 12 then
pUnit:RegisterEvent('spell12_24561', 1, 1)
end
if choix_sorts_24561 == 13 then
pUnit:RegisterEvent('spell13_24561', 1, 1)
end
end

function mob24561_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_24561', math.random(1500, 3000), 1)
end

function mob24561_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob24561_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob24561_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(24561, 1, 'mob24561_Action')
RegisterUnitEvent(24561, 2, 'mob24561_Leave')
RegisterUnitEvent(24561, 3, 'mob24561_Kill')
RegisterUnitEvent(24561, 4, 'mob24561_Die')
